Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

155
Views
Mensaje de error de "lanzar nuevo ERR_INVALID_ARG_TYPE(nombre, 'Función', valor);"

Así que estaba trabajando en mi discord.js v13, pero recibí este mensaje de error en mi consola:

TypeError [ERR_INVALID_ARG_TYPE]: El argumento "oyente" debe ser de tipo función. Recibido indefinido

Este es el código de messageCrete.js :

 const { messageEmbed, Collection } = require('discord.js'); const client = require('..'); const config = require('../config.json'); const prefix = config.prefix; //messageCreate events client.on("messageCreate"), async (message) => { if(!message.author.bot) return; if(!message.content.startsWith(prefix)) return; if(!message.guild) return; if(!message.member) message.member = await message.guild.fetchMember(message); const args = message.content.slice(prefix.length).trim().split(/ +/g); const cmd = args.shift().toLowerCase(); if(cmd.length === 0 ) return; let command = client.commands.get(cmd); if(!command) command = client.commands.get(client.aliases.get(cmd)); command.run(client, message, args); }
about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Intenta usar esto en su lugar:

 client.on("messageCreate", async (message) => { // code here });
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!